<?php

namespace Acme\StoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Annotations;

use Acme\StoreBundle\Entity\Category;

/**
 * Acme\StoreBundle\Entity\Product
 *
 * @ORM\Table(name="product")
 * @ORM\Entity(repositoryClass="Acme\StoreBundle\Repository\ProductRepository")
 */
class Product
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=100)
     */        
    private $name;

    /**
     * @var float $price
     *
     * @ORM\Column(name="price", type="float")
     */
    private $price;

    /**
     * @var text $description
     *
     * @ORM\Column(name="description", type="text")
     */
    private $description;          
    
    /**
     * @ORM\ManyToOne(targetEntity="Category", inversedBy="products")          
     */
    protected $category;

    /**
     * @ORM\OneToOne(targetEntity="Shipping")
     * @ORM\JoinColumn(name="shipping_id", referencedColumnName="id")
     */
    private $shipping; //One-To-One, Unidirectional
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set price
     *
     * @param float $price
     */
    public function setPrice($price)
    {
        $this->price = $price;
    }

    /**
     * Get price
     *
     * @return float 
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * Set description
     *
     * @param text $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * Get description
     *
     * @return text 
     */
    public function getDescription()
    {
        return $this->description;
    }
    
    /**
     * Set category
     *
     * @param text $category
     */
    public function setCategory($category)
    {
    	$this->category = $category;
    }
    
    /**
     * Get category
     *
     * @return text
     */
    public function getCategory()
    {
    	return $this->category;
    }        
    /**
     * @var integer $shipping_id
     */
    private $shipping_id;


    /**
     * Set shipping_id
     *
     * @param integer $shippingId
     */
    public function setShippingId($shippingId)
    {
        $this->shipping_id = $shippingId;
    }

    /**
     * Get shipping_id
     *
     * @return integer 
     */
    public function getShippingId()
    {
        return $this->shipping_id;
    }
}